package com.exception;

import com.pojo.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ExceptionResolver {
    @ExceptionHandler
    public Result doException(Exception e) {
        return new Result(500, e.getMessage(), null);
    }
}
